Prevalence of Confusing Code in Software Projects

نویسندگان

  • Dan Gopstein
  • Hongwei Henry Zhou
  • Phyllis Frankl
  • Justin Cappos
چکیده

Prior work has shown that extremely small code patterns, such as the conditional operator and implicit type conversion, can cause considerable misunderstanding in programmers. Until now, the real world impact of these patterns ś known as ‘atoms of confusion’ ś was only speculative. This work uses a corpus of 14 of the most popular and inluential open source C and C++ projects to measure the prevalence and signiicance of these small confusing patterns. Our results show that the 15 known types of confusing micro patterns occur millions of times in programs like the Linux kernel and GCC, appearing on average once every 23 lines. We show there is a strong correlation between these confusing patterns and bug-ix commits as well as a tendency for confusing patterns to be commented. We also explore patterns at the project level showing the rate of security vulnerabilities is higher in projects with more atoms. Finally, we examine real code examples containing these atoms, including ones that were used to ind and ix bugs in our corpus. In total this work demonstrates that beyond simple misunderstanding in the lab setting, atoms of confusion are both prevalent ś occurring often in real projects, and meaningful ś being removed by bug-ix commits at an elevated rate.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A New Empirical Model to Increase the Accuracy of Software Cost Estimation (TECHNICAL NOTE)

We can say a software project is successful when it is delivered on time, within the budget and maintaining the required quality. However, nowadays software cost estimation is a critical issue for the advance software industry. As the modern software’s behaves dynamically so estimation of the effort and cost is significantly difficult. Since last 30 years, more than 20 models are already develo...

متن کامل

Modularity and Organizational Dynamics in Open Source Software (OSS) production

Modularity has been seen as key to the success of OSS projects. However empirical studies on modularity of OSS systems have resulted in confusing results. To account for underlying mechanisms of those confusing results, we systematically examine widely studied OSS projects. Based on our systematic review on technical and organizational structures, we suggest that organizational circumstances of...

متن کامل

On the usefulness of ownership metrics in open-source software projects

Context: Code ownership metrics were recently defined in order to distinguish major and minor contributors of a software module, and to assess whether the ownership of such a module is strong or shared between developers. Objective: The relationship between these metrics and software quality was initially validated on proprietary software projects. Our objective in this paper is to evaluate suc...

متن کامل

On the Extent and Nature of Software Reuse in Open Source Java Projects

Code repositories on the Internet provide a tremendous amount of freely available open source code that can be reused for building new software. It has been argued that only software reuse can bring the gain of productivity in software construction demanded by the market. However, knowledge about the extent of reuse in software projects is only sparse. To remedy this, we report on an empirical ...

متن کامل

Source Code Reuse Analysis in Multiple Projects based on the Clone Genealogy

In the software industry and OSS projects, it is said that source code reuse could improve productivity and reliability of software development, and reduce development time. On the other hand, source code reuse requires professional skills to developers. Ad-hoc reuse might introduce some maintenance problems. The source code reuse analysis for software development organizations is worthy to be ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2018